/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 洪汤泽大帅哥
 * Date: 2024-11-26
 * Time: 18:56
 */
import java.util.*;
public class Main{

    public static void uppercase(int n){
        Random random = new Random();
        random.setSeed(1);
        char letter;
        for (int i = 0; i < n; i++) {
            letter = (char)(random.nextInt(26) + 'A');
            System.out.print(letter+"  ");
        }
        System.out.println();
    }
    public static void lowercase(int m){
        Random random = new Random();
        random.setSeed(1);
        char letter;
        for (int i = 0; i < m; i++) {
            letter = (char) (random.nextInt(26)+'a');
            System.out.print(letter+"  ");
        }
        System.out.println();
    }

    public static void main(String args[]){
        Scanner scan=new Scanner(System.in);
        int n=scan.nextInt();
        System.out.println("随机产生"+n+"个大写字母");
        int m=scan.nextInt();
        uppercase(n);
        System.out.println("随机产生"+m+"个小写字母");
        lowercase(m);
        scan.close();
    }
}